package com.cmwa.scbp.utils;

import com.cmwa.scbp.base.mvc.entity.Employee;

public class SessionUtils {

	public static final String SESSION_EMPLOYEE = "_session_employee_";

	private static final ThreadLocal<Employee> Employees = new ThreadLocal<Employee>();

	/**
	 * 从当前线程中取登录用户信息
	 * 
	 * @return
	 */
	public static Employee getEmployee() {

		Employee employee = Employees.get();
		if (employee == null)
			employee = new Employee();
		return employee;
	}

	public static void setEmployee(Employee employee) {
		Employees.set(employee);
	}

}
